<?php if(!empty($rolesNodeType)):?>
    <?php foreach($rolesNodeType as $key=>$values):?>
    <?php 
        $checked = "";
        $checked = ClassRegistry::init('User.RoleNodeType')->find('first',array(
            'conditions'=>array('RoleNodeType.node_type_id'=>$values['NodeType']['id'],'RoleNodeType.role_id'=>$role_id),                            
            'recursive'=>-1
        ));                                             
    ?>
        <div class="checkbox">        
            <div class="chk-node-type">
                <span><input type="checkbox" name="data[Role][NodeType][]" value="<?php echo $values['NodeType']['id'];?>" <?php if(!empty($checked)){echo 'checked';}?>></span>
            </div>
            <label for="RoleNodeType<?php echo $values['NodeType']['id'];?>"><?php echo $values['NodeType']['name'];?></label>
        </div>
    <?php endforeach;?>
<?php endif;?>